package com.kinyx.framework.data.serializer;

import java.io.IOException;
import java.util.Date;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.kinyx.framework.utils.KDateTimeUtils;

public class JsonSerializer4Date extends JsonSerializer<Date> {

	@Override
	public void serialize(final Date value, final JsonGenerator gen, final SerializerProvider serializers) throws IOException {
		gen.writeString(KDateTimeUtils.toString(value, null));
	}

}
